(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
quot(x, 0) → quotZeroErro
quot(x, s(y)) → quotIter(x, s(y), 0, 0, 0)
quotIter(x, s(y), z, u, v) → if(le(x, z), x, s(y), z, u, v)
if(true, x, y, z, u, v) → v
if(false, x, y, z, u, v) → if2(le(y, s(u)), x, y, s(z), s(u), v)
if2(false, x, y, z, u, v) → quotIter(x, y, z, u, v)
if2(true, x, y, z, u, v) → quotIter(x, y, z, 0, s(v))

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
quot(x, 0) → quotZeroErro [1]
quot(x, s(y)) → quotIter(x, s(y), 0, 0, 0) [1]
quotIter(x, s(y), z, u, v) → if(le(x, z), x, s(y), z, u, v) [1]
if(true, x, y, z, u, v) → v [1]
if(false, x, y, z, u, v) → if2(le(y, s(u)), x, y, s(z), s(u), v) [1]
if2(false, x, y, z, u, v) → quotIter(x, y, z, u, v) [1]
if2(true, x, y, z, u, v) → quotIter(x, y, z, 0, s(v)) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
quot(x, 0) → quotZeroErro [1]
quot(x, s(y)) → quotIter(x, s(y), 0, 0, 0) [1]
quotIter(x, s(y), z, u, v) → if(le(x, z), x, s(y), z, u, v) [1]
if(true, x, y, z, u, v) → v [1]
if(false, x, y, z, u, v) → if2(le(y, s(u)), x, y, s(z), s(u), v) [1]
if2(false, x, y, z, u, v) → quotIter(x, y, z, u, v) [1]
if2(true, x, y, z, u, v) → quotIter(x, y, z, 0, s(v)) [1]

The TRS has the following type information:
le :: 0:s:quotZeroErro → 0:s:quotZeroErro → true:false
0 :: 0:s:quotZeroErro
true :: true:false
s :: 0:s:quotZeroErro → 0:s:quotZeroErro
false :: true:false
quot :: 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro
quotZeroErro :: 0:s:quotZeroErro
quotIter :: 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro
if :: true:false → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro
if2 :: true:false → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro → 0:s:quotZeroErro

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added:

le(v0, v1) → null_le [0]
quot(v0, v1) → null_quot [0]
quotIter(v0, v1, v2, v3, v4) → null_quotIter [0]
if(v0, v1, v2, v3, v4, v5) → null_if [0]
if2(v0, v1, v2, v3, v4, v5) → null_if2 [0]

And the following fresh constants:

null_le, null_quot, null_quotIter, null_if, null_if2

(6) Obligation:

Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

le(0, y) → true [1]
le(s(x), 0) → false [1]
le(s(x), s(y)) → le(x, y) [1]
quot(x, 0) → quotZeroErro [1]
quot(x, s(y)) → quotIter(x, s(y), 0, 0, 0) [1]
quotIter(x, s(y), z, u, v) → if(le(x, z), x, s(y), z, u, v) [1]
if(true, x, y, z, u, v) → v [1]
if(false, x, y, z, u, v) → if2(le(y, s(u)), x, y, s(z), s(u), v) [1]
if2(false, x, y, z, u, v) → quotIter(x, y, z, u, v) [1]
if2(true, x, y, z, u, v) → quotIter(x, y, z, 0, s(v)) [1]
le(v0, v1) → null_le [0]
quot(v0, v1) → null_quot [0]
quotIter(v0, v1, v2, v3, v4) → null_quotIter [0]
if(v0, v1, v2, v3, v4, v5) → null_if [0]
if2(v0, v1, v2, v3, v4, v5) → null_if2 [0]

The TRS has the following type information:
le :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → true:false:null_le
0 :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
true :: true:false:null_le
s :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
false :: true:false:null_le
quot :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
quotZeroErro :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
quotIter :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
if :: true:false:null_le → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
if2 :: true:false:null_le → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2 → 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
null_le :: true:false:null_le
null_quot :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
null_quotIter :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
null_if :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2
null_if2 :: 0:s:quotZeroErro:null_quot:null_quotIter:null_if:null_if2

Rewrite Strategy: INNERMOST

(7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

0 => 0
true => 2
false => 1
quotZeroErro => 1
null_le => 0
null_quot => 0
null_quotIter => 0
null_if => 0
null_if2 => 0

(8) Obligation:

Complexity RNTS consisting of the following rules:

if(z', z'', z1, z2, z3, z4) -{ 1 }→ v :|: z1 = y, z4 = v, z >= 0, v >= 0, z' = 2, z2 = z, x >= 0, y >= 0, z'' = x, z3 = u, u >= 0
if(z', z'', z1, z2, z3, z4) -{ 1 }→ if2(le(y, 1 + u), x, y, 1 + z, 1 + u, v) :|: z1 = y, z4 = v, z >= 0, v >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1, z3 = u, u >= 0
if(z', z'', z1, z2, z3, z4) -{ 0 }→ 0 :|: z2 = v3, z4 = v5, v0 >= 0, v4 >= 0, z1 = v2, v1 >= 0, v5 >= 0, z'' = v1, z3 = v4, v2 >= 0, v3 >= 0, z' = v0
if2(z', z'', z1, z2, z3, z4) -{ 1 }→ quotIter(x, y, z, u, v) :|: z1 = y, z4 = v, z >= 0, v >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1, z3 = u, u >= 0
if2(z', z'', z1, z2, z3, z4) -{ 1 }→ quotIter(x, y, z, 0, 1 + v) :|: z1 = y, z4 = v, z >= 0, v >= 0, z' = 2, z2 = z, x >= 0, y >= 0, z'' = x, z3 = u, u >= 0
if2(z', z'', z1, z2, z3, z4) -{ 0 }→ 0 :|: z2 = v3, z4 = v5, v0 >= 0, v4 >= 0, z1 = v2, v1 >= 0, v5 >= 0, z'' = v1, z3 = v4, v2 >= 0, v3 >= 0, z' = v0
le(z', z'') -{ 1 }→ le(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
le(z', z'') -{ 1 }→ 2 :|: z'' = y, y >= 0, z' = 0
le(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 1 + x, x >= 0
le(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
quot(z', z'') -{ 1 }→ quotIter(x, 1 + y, 0, 0, 0) :|: z' = x, x >= 0, y >= 0, z'' = 1 + y
quot(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = x, x >= 0
quot(z', z'') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z'' = v1, z' = v0
quotIter(z', z'', z1, z2, z3) -{ 1 }→ if(le(x, z), x, 1 + y, z, u, v) :|: z1 = z, z2 = u, z >= 0, v >= 0, z' = x, x >= 0, y >= 0, z'' = 1 + y, z3 = v, u >= 0
quotIter(z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z2 = v3, v0 >= 0, v4 >= 0, z1 = v2, v1 >= 0, z'' = v1, z3 = v4, v2 >= 0, v3 >= 0, z' = v0

Only complete derivations are relevant for the runtime complexity.

(9) CompleteCoflocoProof (EQUIVALENT transformation)

Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo:

eq(start(V, V1, V9, V10, V11, V17),0,[le(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V9, V10, V11, V17),0,[quot(V, V1, Out)],[V >= 0,V1 >= 0]).
eq(start(V, V1, V9, V10, V11, V17),0,[quotIter(V, V1, V9, V10, V11, Out)],[V >= 0,V1 >= 0,V9 >= 0,V10 >= 0,V11 >= 0]).
eq(start(V, V1, V9, V10, V11, V17),0,[if(V, V1, V9, V10, V11, V17, Out)],[V >= 0,V1 >= 0,V9 >= 0,V10 >= 0,V11 >= 0,V17 >= 0]).
eq(start(V, V1, V9, V10, V11, V17),0,[if2(V, V1, V9, V10, V11, V17, Out)],[V >= 0,V1 >= 0,V9 >= 0,V10 >= 0,V11 >= 0,V17 >= 0]).
eq(le(V, V1, Out),1,[],[Out = 2,V1 = V2,V2 >= 0,V = 0]).
eq(le(V, V1, Out),1,[],[Out = 1,V1 = 0,V = 1 + V3,V3 >= 0]).
eq(le(V, V1, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V4,V4 >= 0,V5 >= 0,V1 = 1 + V5]).
eq(quot(V, V1, Out),1,[],[Out = 1,V1 = 0,V = V6,V6 >= 0]).
eq(quot(V, V1, Out),1,[quotIter(V7, 1 + V8, 0, 0, 0, Ret1)],[Out = Ret1,V = V7,V7 >= 0,V8 >= 0,V1 = 1 + V8]).
eq(quotIter(V, V1, V9, V10, V11, Out),1,[le(V12, V13, Ret0),if(Ret0, V12, 1 + V14, V13, V15, V16, Ret2)],[Out = Ret2,V9 = V13,V10 = V15,V13 >= 0,V16 >= 0,V = V12,V12 >= 0,V14 >= 0,V1 = 1 + V14,V11 = V16,V15 >= 0]).
eq(if(V, V1, V9, V10, V11, V17, Out),1,[],[Out = V18,V9 = V19,V17 = V18,V20 >= 0,V18 >= 0,V = 2,V10 = V20,V21 >= 0,V19 >= 0,V1 = V21,V11 = V22,V22 >= 0]).
eq(if(V, V1, V9, V10, V11, V17, Out),1,[le(V23, 1 + V24, Ret01),if2(Ret01, V25, V23, 1 + V26, 1 + V24, V27, Ret3)],[Out = Ret3,V9 = V23,V17 = V27,V26 >= 0,V27 >= 0,V10 = V26,V25 >= 0,V23 >= 0,V1 = V25,V = 1,V11 = V24,V24 >= 0]).
eq(if2(V, V1, V9, V10, V11, V17, Out),1,[quotIter(V28, V29, V30, V31, V32, Ret4)],[Out = Ret4,V9 = V29,V17 = V32,V30 >= 0,V32 >= 0,V10 = V30,V28 >= 0,V29 >= 0,V1 = V28,V = 1,V11 = V31,V31 >= 0]).
eq(if2(V, V1, V9, V10, V11, V17, Out),1,[quotIter(V33, V34, V35, 0, 1 + V36, Ret5)],[Out = Ret5,V9 = V34,V17 = V36,V35 >= 0,V36 >= 0,V = 2,V10 = V35,V33 >= 0,V34 >= 0,V1 = V33,V11 = V37,V37 >= 0]).
eq(le(V, V1, Out),0,[],[Out = 0,V38 >= 0,V39 >= 0,V1 = V39,V = V38]).
eq(quot(V, V1, Out),0,[],[Out = 0,V40 >= 0,V41 >= 0,V1 = V41,V = V40]).
eq(quotIter(V, V1, V9, V10, V11, Out),0,[],[Out = 0,V10 = V42,V43 >= 0,V44 >= 0,V9 = V45,V46 >= 0,V1 = V46,V11 = V44,V45 >= 0,V42 >= 0,V = V43]).
eq(if(V, V1, V9, V10, V11, V17, Out),0,[],[Out = 0,V10 = V47,V17 = V48,V49 >= 0,V50 >= 0,V9 = V51,V52 >= 0,V48 >= 0,V1 = V52,V11 = V50,V51 >= 0,V47 >= 0,V = V49]).
eq(if2(V, V1, V9, V10, V11, V17, Out),0,[],[Out = 0,V10 = V53,V17 = V54,V55 >= 0,V56 >= 0,V9 = V57,V58 >= 0,V54 >= 0,V1 = V58,V11 = V56,V57 >= 0,V53 >= 0,V = V55]).
input_output_vars(le(V,V1,Out),[V,V1],[Out]).
input_output_vars(quot(V,V1,Out),[V,V1],[Out]).
input_output_vars(quotIter(V,V1,V9,V10,V11,Out),[V,V1,V9,V10,V11],[Out]).
input_output_vars(if(V,V1,V9,V10,V11,V17,Out),[V,V1,V9,V10,V11,V17],[Out]).
input_output_vars(if2(V,V1,V9,V10,V11,V17,Out),[V,V1,V9,V10,V11,V17],[Out]).

CoFloCo proof output:
Preprocessing Cost Relations
=====================================

#### Computed strongly connected components
0. recursive : [le/3]
1. recursive : [if/7,if2/7,quotIter/6]
2. non_recursive : [quot/3]
3. non_recursive : [start/6]

#### Obtained direct recursion through partial evaluation
0. SCC is partially evaluated into le/3
1. SCC is partially evaluated into quotIter/6
2. SCC is partially evaluated into quot/3
3. SCC is partially evaluated into start/6

Control-Flow Refinement of Cost Relations
=====================================

### Specialization of cost equations le/3
* CE 15 is refined into CE [25]
* CE 13 is refined into CE [26]
* CE 12 is refined into CE [27]
* CE 14 is refined into CE [28]


### Cost equations --> "Loop" of le/3
* CEs [28] --> Loop 14
* CEs [25] --> Loop 15
* CEs [26] --> Loop 16
* CEs [27] --> Loop 17

### Ranking functions of CR le(V,V1,Out)
* RF of phase [14]: [V,V1]

#### Partial ranking functions of CR le(V,V1,Out)
* Partial RF of phase [14]:
- RF of loop [14:1]:
V
V1


### Specialization of cost equations quotIter/6
* CE 20 is refined into CE [29,30]
* CE 16 is refined into CE [31,32,33,34,35,36]
* CE 19 is refined into CE [37,38,39,40,41]
* CE 21 is refined into CE [42]
* CE 18 is refined into CE [43,44]
* CE 17 is refined into CE [45,46]


### Cost equations --> "Loop" of quotIter/6
* CEs [44] --> Loop 18
* CEs [46] --> Loop 19
* CEs [43] --> Loop 20
* CEs [45] --> Loop 21
* CEs [30] --> Loop 22
* CEs [31,32,33,38] --> Loop 23
* CEs [29] --> Loop 24
* CEs [34,35,36,37,39,40,41,42] --> Loop 25

### Ranking functions of CR quotIter(V,V1,V9,V10,V11,Out)
* RF of phase [18,19]: [V-V9]

#### Partial ranking functions of CR quotIter(V,V1,V9,V10,V11,Out)
* Partial RF of phase [18,19]:
- RF of loop [18:1]:
V1-V10-1 depends on loops [19:1]
- RF of loop [18:1,19:1]:
V-V9


### Specialization of cost equations quot/3
* CE 23 is refined into CE [47,48,49,50,51,52]
* CE 24 is refined into CE [53]
* CE 22 is refined into CE [54]


### Cost equations --> "Loop" of quot/3
* CEs [52] --> Loop 26
* CEs [51] --> Loop 27
* CEs [54] --> Loop 28
* CEs [49] --> Loop 29
* CEs [48] --> Loop 30
* CEs [47,50,53] --> Loop 31

### Ranking functions of CR quot(V,V1,Out)

#### Partial ranking functions of CR quot(V,V1,Out)


### Specialization of cost equations start/6
* CE 5 is refined into CE [55,56,57,58,59,60,61,62]
* CE 8 is refined into CE [63]
* CE 2 is refined into CE [64,65,66,67]
* CE 3 is refined into CE [68]
* CE 4 is refined into CE [69,70,71,72,73]
* CE 6 is refined into CE [74,75,76,77]
* CE 7 is refined into CE [78,79,80,81,82,83,84,85]
* CE 9 is refined into CE [86,87,88,89,90]
* CE 10 is refined into CE [91,92,93,94,95]
* CE 11 is refined into CE [96,97,98,99,100,101,102,103]


### Cost equations --> "Loop" of start/6
* CEs [101] --> Loop 32
* CEs [100] --> Loop 33
* CEs [87,93] --> Loop 34
* CEs [60] --> Loop 35
* CEs [59] --> Loop 36
* CEs [57] --> Loop 37
* CEs [56,94] --> Loop 38
* CEs [55,58,61,62,63] --> Loop 39
* CEs [83] --> Loop 40
* CEs [82] --> Loop 41
* CEs [98] --> Loop 42
* CEs [97] --> Loop 43
* CEs [64,69] --> Loop 44
* CEs [79,80,91] --> Loop 45
* CEs [65,66,67,70,71,72,73,74,75,76,77,78,81,84,85] --> Loop 46
* CEs [68,86,88,89,90,92,95,96,99,102,103] --> Loop 47

### Ranking functions of CR start(V,V1,V9,V10,V11,V17)

#### Partial ranking functions of CR start(V,V1,V9,V10,V11,V17)


Computing Bounds
=====================================

#### Cost of chains of le(V,V1,Out):
* Chain [[14],17]: 1*it(14)+1
Such that:it(14) =< V

with precondition: [Out=2,V>=1,V1>=V]

* Chain [[14],16]: 1*it(14)+1
Such that:it(14) =< V1

with precondition: [Out=1,V1>=1,V>=V1+1]

* Chain [[14],15]: 1*it(14)+0
Such that:it(14) =< V1

with precondition: [Out=0,V>=1,V1>=1]

* Chain [17]: 1
with precondition: [V=0,Out=2,V1>=0]

* Chain [16]: 1
with precondition: [V1=0,Out=1,V>=1]

* Chain [15]: 0
with precondition: [Out=0,V>=0,V1>=0]


#### Cost of chains of quotIter(V,V1,V9,V10,V11,Out):
* Chain [[18,19],25]: 10*it(18)+6*s(2)+3*s(3)+1*s(7)+1*s(19)+1*s(20)+1*s(21)+4
Such that:s(7) =< V1
aux(13) =< V1+V10
aux(14) =< V
aux(15) =< V-V9
aux(16) =< V-V9+V10+1
s(2) =< aux(14)
s(3) =< aux(16)
it(18) =< aux(15)
aux(7) =< aux(14)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(13)
s(19) =< it(18)*aux(14)

with precondition: [Out=0,V1>=1,V9>=1,V10>=0,V11>=0,V>=V9+1]

* Chain [[18,19],22]: 10*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(22)+1*s(23)+3
Such that:s(22) =< V-V9+V10
aux(13) =< V1+V10
aux(17) =< V
aux(18) =< V-V9
s(23) =< aux(17)
it(18) =< aux(18)
aux(7) =< aux(17)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(13)
s(19) =< it(18)*aux(17)

with precondition: [V1>=1,V9>=1,V10>=0,V11>=0,V>=V9+1,Out>=V11,Out+V1>=V11+2,V+V11>=Out+V9]

* Chain [25]: 5*s(2)+2*s(3)+1*s(7)+1*s(10)+4
Such that:s(10) =< V
s(7) =< V1
aux(1) =< V9
aux(2) =< V10+1
s(2) =< aux(1)
s(3) =< aux(2)

with precondition: [Out=0,V>=0,V1>=0,V9>=0,V10>=0,V11>=0]

* Chain [24]: 3
with precondition: [V=0,V11=Out,V1>=1,V9>=0,V10>=0,V11>=0]

* Chain [23]: 2*s(24)+1*s(26)+4
Such that:s(26) =< V1
aux(19) =< V10+1
s(24) =< aux(19)

with precondition: [V9=0,Out=0,V>=1,V1>=1,V10>=0,V11>=0]

* Chain [22]: 1*s(23)+3
Such that:s(23) =< V

with precondition: [V11=Out,V>=1,V1>=1,V10>=0,V11>=0,V9>=V]

* Chain [21,[18,19],25]: 19*it(18)+2*s(7)+1*s(19)+1*s(20)+1*s(21)+9
Such that:aux(20) =< V
aux(21) =< V1
s(7) =< aux(21)
it(18) =< aux(20)
aux(7) =< aux(20)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(21)
s(19) =< it(18)*aux(20)

with precondition: [V9=0,Out=0,V>=2,V1>=1,V11>=0,V10+1>=V1]

* Chain [21,[18,19],22]: 12*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(27)+8
Such that:aux(22) =< V
aux(23) =< V1
it(18) =< aux(22)
s(27) =< aux(23)
aux(7) =< aux(22)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(23)
s(19) =< it(18)*aux(22)

with precondition: [V9=0,V>=2,V1>=1,V11>=0,V10+1>=V1,Out>=V11+1,Out+V1>=V11+3,V+V11>=Out]

* Chain [21,25]: 7*s(2)+2*s(7)+1*s(10)+9
Such that:s(10) =< V
aux(24) =< 1
aux(25) =< V1
s(7) =< aux(25)
s(2) =< aux(24)

with precondition: [V9=0,Out=0,V>=1,V1>=1,V11>=0,V10+1>=V1]

* Chain [21,22]: 1*s(23)+1*s(27)+8
Such that:s(23) =< 1
s(27) =< V1

with precondition: [V=1,V9=0,Out=V11+1,V1>=1,Out>=1,V10+1>=V1]

* Chain [20,[18,19],25]: 16*it(18)+3*s(3)+1*s(7)+1*s(19)+1*s(20)+1*s(21)+1*s(28)+9
Such that:aux(16) =< V+V10+1
s(7) =< V1
aux(13) =< V1+V10+1
s(28) =< V10+1
aux(26) =< V
it(18) =< aux(26)
s(3) =< aux(16)
aux(7) =< aux(26)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(13)
s(19) =< it(18)*aux(26)

with precondition: [V9=0,Out=0,V>=2,V10>=0,V11>=0,V1>=V10+2]

* Chain [20,[18,19],22]: 11*it(18)+1*s(19)+1*s(20)+1*s(21)+1*s(22)+1*s(28)+8
Such that:s(22) =< V+V10
aux(13) =< V1+V10+1
s(28) =< V10+1
aux(27) =< V
it(18) =< aux(27)
aux(7) =< aux(27)
s(21) =< it(18)*aux(7)
s(20) =< it(18)*aux(13)
s(19) =< it(18)*aux(27)

with precondition: [V9=0,V>=2,V10>=0,V11>=0,V1>=V10+2,Out>=V11,V+V11>=Out+1]

* Chain [20,25]: 5*s(2)+2*s(3)+1*s(7)+1*s(10)+1*s(28)+9
Such that:aux(1) =< 1
s(10) =< V
s(7) =< V1
s(28) =< V10+1
aux(2) =< V10+2
s(2) =< aux(1)
s(3) =< aux(2)

with precondition: [V9=0,Out=0,V>=1,V10>=0,V11>=0,V1>=V10+2]

* Chain [20,22]: 1*s(23)+1*s(28)+8
Such that:s(23) =< 1
s(28) =< V10+1

with precondition: [V=1,V9=0,V11=Out,V10>=0,V11>=0,V1>=V10+2]


#### Cost of chains of quot(V,V1,Out):
* Chain [31]: 54*s(92)+9*s(93)+18*s(94)+2*s(96)+3*s(98)+2*s(99)+3*s(100)+6*s(102)+1*s(103)+10
Such that:aux(32) =< 1
s(87) =< 2
aux(33) =< V
aux(34) =< V+1
aux(35) =< V1
s(85) =< V1+1
s(92) =< aux(33)
s(93) =< aux(35)
s(94) =< aux(32)
s(96) =< s(87)
s(97) =< aux(33)
s(98) =< s(92)*s(97)
s(99) =< s(92)*aux(35)
s(100) =< s(92)*aux(33)
s(102) =< aux(34)
s(103) =< s(92)*s(85)

with precondition: [Out=0,V>=0,V1>=0]

* Chain [30]: 2*s(109)+9
Such that:aux(36) =< 1
s(109) =< aux(36)

with precondition: [V=1,V1=1,Out=1]

* Chain [29]: 2*s(111)+9
Such that:aux(37) =< 1
s(111) =< aux(37)

with precondition: [V=1,Out=0,V1>=2]

* Chain [28]: 1
with precondition: [V1=0,Out=1,V>=0]

* Chain [27]: 12*s(115)+1*s(116)+1*s(118)+1*s(119)+1*s(120)+9
Such that:s(114) =< 1
s(113) =< V
s(115) =< s(113)
s(116) =< s(114)
s(117) =< s(113)
s(118) =< s(115)*s(117)
s(119) =< s(115)*s(114)
s(120) =< s(115)*s(113)

with precondition: [V1=1,Out>=2,V>=Out]

* Chain [26]: 12*s(121)+1*s(123)+1*s(127)+1*s(128)+1*s(129)+9
Such that:s(123) =< 1
s(122) =< V1+1
aux(38) =< V
s(121) =< aux(38)
s(126) =< aux(38)
s(127) =< s(121)*s(126)
s(128) =< s(121)*s(122)
s(129) =< s(121)*aux(38)

with precondition: [V>=2,V1>=2,Out>=0,V>=Out+1]


#### Cost of chains of start(V,V1,V9,V10,V11,V17):
* Chain [47]: 20*s(148)+113*s(150)+33*s(157)+2*s(160)+6*s(162)+3*s(163)+6*s(164)+6*s(165)+2*s(166)+6*s(188)+2*s(190)+5*s(195)+3*s(196)+1*s(197)+3*s(198)+20*s(199)+2*s(200)+2*s(201)+2*s(202)+1*s(204)+10
Such that:s(151) =< 2
s(153) =< V+1
s(204) =< V-V9+V10
s(176) =< V-V9+V10+1
s(177) =< V+V10+1
s(179) =< V1+V10+1
s(180) =< V9
s(185) =< V10+1
s(181) =< V10+2
aux(40) =< 1
aux(41) =< V
aux(42) =< V-V9
aux(43) =< V1
aux(44) =< V1+1
aux(45) =< V1+V10
s(157) =< aux(40)
s(150) =< aux(41)
s(148) =< aux(43)
s(160) =< s(151)
s(161) =< aux(41)
s(162) =< s(150)*s(161)
s(163) =< s(150)*aux(43)
s(164) =< s(150)*aux(41)
s(165) =< s(153)
s(166) =< s(150)*aux(44)
s(188) =< s(185)
s(190) =< s(181)
s(195) =< s(180)
s(196) =< s(177)
s(197) =< s(150)*s(179)
s(198) =< s(176)
s(199) =< aux(42)
s(200) =< s(199)*s(161)
s(201) =< s(199)*aux(45)
s(202) =< s(199)*aux(41)

with precondition: [V>=0,V1>=0]

* Chain [46]: 12*s(214)+32*s(216)+138*s(230)+42*s(232)+2*s(234)+6*s(236)+3*s(237)+6*s(238)+10*s(239)+3*s(240)+1*s(241)+64*s(242)+6*s(244)+2*s(245)+6*s(246)+8*s(275)+2*s(277)+3*s(283)+1*s(284)+6*s(285)+2*s(288)+2*s(293)+5*s(323)+3*s(324)+1*s(325)+2*s(329)+12
Such that:s(225) =< 2
s(221) =< V1+1
s(305) =< V1+V11+1
s(264) =< V1+V11+2
s(223) =< V9+1
s(266) =< V9+V11+2
s(308) =< V10
s(268) =< V11+3
aux(51) =< 1
aux(52) =< V1
aux(53) =< V1-V10
aux(54) =< V1-V10+V11
aux(55) =< V1-V10+V11+1
aux(56) =< V9
aux(57) =< V9+V11
aux(58) =< V9+V11+1
aux(59) =< V10+1
aux(60) =< V11+1
aux(61) =< V11+2
s(230) =< aux(52)
s(293) =< aux(54)
s(216) =< aux(56)
s(214) =< aux(60)
s(275) =< aux(61)
s(232) =< aux(51)
s(277) =< s(268)
s(235) =< aux(52)
s(236) =< s(230)*s(235)
s(237) =< s(230)*aux(56)
s(238) =< s(230)*aux(52)
s(239) =< aux(59)
s(283) =< s(264)
s(284) =< s(230)*s(266)
s(285) =< aux(55)
s(242) =< aux(53)
s(244) =< s(242)*s(235)
s(288) =< s(242)*aux(58)
s(246) =< s(242)*aux(52)
s(323) =< s(308)
s(324) =< s(305)
s(325) =< s(230)*aux(58)
s(329) =< s(242)*aux(57)
s(234) =< s(225)
s(240) =< s(221)
s(241) =< s(230)*s(223)
s(245) =< s(242)*aux(56)

with precondition: [V=1,V1>=0,V9>=0,V10>=0,V11>=0,V17>=0]

* Chain [45]: 4*s(342)+1*s(343)+1*s(345)+9
Such that:s(343) =< V9
s(345) =< V11+1
aux(62) =< 1
s(342) =< aux(62)

with precondition: [V=1,V1=1]

* Chain [44]: 44*s(359)+18*s(361)+2*s(363)+2*s(365)+2*s(367)+5*s(368)+3*s(369)+1*s(370)+13*s(371)+1*s(373)+1*s(375)+12
Such that:aux(64) =< 1
s(354) =< 2
s(356) =< V1
s(350) =< V1+1
aux(65) =< V1-V10
s(353) =< V10+1
s(359) =< s(356)
s(361) =< aux(64)
s(363) =< s(354)
s(364) =< s(356)
s(365) =< s(359)*s(364)
s(367) =< s(359)*s(356)
s(368) =< s(353)
s(369) =< s(350)
s(370) =< s(359)*aux(64)
s(371) =< aux(65)
s(373) =< s(371)*s(364)
s(375) =< s(371)*s(356)

with precondition: [V=1,V9=0,V1>=0,V10>=0,V11>=0,V17>=0]

* Chain [43]: 1*s(376)+1*s(377)+8
Such that:s(376) =< 1
s(377) =< V1

with precondition: [V=1,V9=0,V1>=1,V11>=0,V10+1>=V1]

* Chain [42]: 1*s(378)+1*s(379)+8
Such that:s(378) =< 1
s(379) =< V10+1

with precondition: [V=1,V9=0,V10>=0,V11>=0,V1>=V10+2]

* Chain [41]: 12*s(382)+1*s(383)+1*s(385)+1*s(386)+1*s(387)+9
Such that:s(380) =< V1
s(381) =< V9
s(382) =< s(380)
s(383) =< s(381)
s(384) =< s(380)
s(385) =< s(382)*s(384)
s(386) =< s(382)*s(381)
s(387) =< s(382)*s(380)

with precondition: [V=1,V10=0,V1>=2,V9>=1,V17>=0,V11+1>=V9]

* Chain [40]: 1*s(388)+1*s(390)+11*s(392)+1*s(394)+1*s(395)+1*s(396)+9
Such that:s(391) =< V1
s(388) =< V1+V11
s(389) =< V9+V11+1
s(390) =< V11+1
s(392) =< s(391)
s(393) =< s(391)
s(394) =< s(392)*s(393)
s(395) =< s(392)*s(389)
s(396) =< s(392)*s(391)

with precondition: [V=1,V10=0,V1>=2,V11>=0,V17>=0,V9>=V11+2]

* Chain [39]: 46*s(408)+9*s(409)+18*s(410)+2*s(412)+2*s(414)+1*s(415)+2*s(416)+5*s(417)+3*s(418)+1*s(419)+3*s(420)+21*s(421)+2*s(422)+2*s(423)+2*s(424)+10
Such that:aux(66) =< 1
s(403) =< 2
s(399) =< V1+1
s(398) =< V1-V10+1
s(401) =< V9+1
s(402) =< V10
aux(69) =< V1
aux(70) =< V1-V10
aux(71) =< V9
s(408) =< aux(69)
s(409) =< aux(71)
s(410) =< aux(66)
s(412) =< s(403)
s(413) =< aux(69)
s(414) =< s(408)*s(413)
s(415) =< s(408)*aux(71)
s(416) =< s(408)*aux(69)
s(417) =< s(402)
s(418) =< s(399)
s(419) =< s(408)*s(401)
s(420) =< s(398)
s(421) =< aux(70)
s(422) =< s(421)*s(413)
s(423) =< s(421)*aux(71)
s(424) =< s(421)*aux(69)

with precondition: [V=2,V1>=0,V9>=0,V10>=0,V11>=0,V17>=0]

* Chain [38]: 3*s(436)+12*s(440)+1*s(443)+1*s(444)+1*s(445)+9
Such that:s(439) =< V
aux(73) =< 1
s(436) =< aux(73)
s(440) =< s(439)
s(442) =< s(439)
s(443) =< s(440)*s(442)
s(444) =< s(440)*aux(73)
s(445) =< s(440)*s(439)

with precondition: [V1=1,V>=2]

* Chain [37]: 2*s(446)+9
Such that:aux(74) =< 1
s(446) =< aux(74)

with precondition: [V=2,V1=1,V10=0,V9>=2,V11>=0,V17>=0]

* Chain [36]: 12*s(450)+1*s(451)+1*s(453)+1*s(454)+1*s(455)+9
Such that:s(449) =< 1
s(448) =< V1
s(450) =< s(448)
s(451) =< s(449)
s(452) =< s(448)
s(453) =< s(450)*s(452)
s(454) =< s(450)*s(449)
s(455) =< s(450)*s(448)

with precondition: [V=2,V9=1,V10=0,V1>=2,V11>=0,V17>=0]

* Chain [35]: 12*s(456)+1*s(458)+1*s(462)+1*s(463)+1*s(464)+9
Such that:s(458) =< 1
s(457) =< V9+1
aux(75) =< V1
s(456) =< aux(75)
s(461) =< aux(75)
s(462) =< s(456)*s(461)
s(463) =< s(456)*s(457)
s(464) =< s(456)*aux(75)

with precondition: [V=2,V10=0,V1>=2,V9>=2,V11>=0,V17>=0]

* Chain [34]: 1
with precondition: [V1=0,V>=0]

* Chain [33]: 12*s(467)+1*s(468)+1*s(470)+1*s(471)+1*s(472)+8
Such that:s(465) =< V
s(466) =< V1
s(467) =< s(465)
s(468) =< s(466)
s(469) =< s(465)
s(470) =< s(467)*s(469)
s(471) =< s(467)*s(466)
s(472) =< s(467)*s(465)

with precondition: [V9=0,V>=2,V1>=1,V11>=0,V10+1>=V1]

* Chain [32]: 1*s(473)+1*s(475)+11*s(477)+1*s(479)+1*s(480)+1*s(481)+8
Such that:s(476) =< V
s(473) =< V+V10
s(474) =< V1+V10+1
s(475) =< V10+1
s(477) =< s(476)
s(478) =< s(476)
s(479) =< s(477)*s(478)
s(480) =< s(477)*s(474)
s(481) =< s(477)*s(476)

with precondition: [V9=0,V>=2,V10>=0,V11>=0,V1>=V10+2]


Closed-form bounds of start(V,V1,V9,V10,V11,V17):
-------------------------------------
* Chain [47] with precondition: [V>=0,V1>=0]
- Upper bound: 113*V+47+12*V*V+4*V*nat(V-V9)+20*V1+3*V1*V+nat(V9)*5+ (6*V+6)+nat(V1+V10)*2*nat(V-V9)+ (2*V1+2)*V+nat(V10+1)*6+nat(V10+2)*2+nat(V+V10+1)*3+nat(V1+V10+1)*V+nat(V-V9+V10+1)*3+nat(V-V9+V10)+nat(V-V9)*20
- Complexity: n^2
* Chain [46] with precondition: [V=1,V1>=0,V9>=0,V10>=0,V11>=0,V17>=0]
- Upper bound: 138*V1+58+12*V1*V1+12*V1*nat(V1-V10)+32*V9+3*V9*V1+2*V9*nat(V1-V10)+5*V10+ (3*V1+3)+ (2*V9+2*V11)*nat(V1-V10)+ (V9+1)*V1+ (10*V10+10)+ (12*V11+12)+ (8*V11+16)+ (2*V11+6)+ (3*V1+3*V11+3)+ (3*V1+3*V11+6)+ (V9+V11+1)*V1+ (2*V9+2*V11+2)*nat(V1-V10)+ (V9+V11+2)*V1+nat(V1-V10+V11+1)*6+nat(V1-V10+V11)*2+nat(V1-V10)*64
- Complexity: n^2
* Chain [45] with precondition: [V=1,V1=1]
- Upper bound: nat(V9)+13+nat(V11+1)
- Complexity: n
* Chain [44] with precondition: [V=1,V9=0,V1>=0,V10>=0,V11>=0,V17>=0]
- Upper bound: 45*V1+34+4*V1*V1+2*V1*nat(V1-V10)+ (3*V1+3)+ (5*V10+5)+nat(V1-V10)*13
- Complexity: n^2
* Chain [43] with precondition: [V=1,V9=0,V1>=1,V11>=0,V10+1>=V1]
- Upper bound: V1+9
- Complexity: n
* Chain [42] with precondition: [V=1,V9=0,V10>=0,V11>=0,V1>=V10+2]
- Upper bound: V10+10
- Complexity: n
* Chain [41] with precondition: [V=1,V10=0,V1>=2,V9>=1,V17>=0,V11+1>=V9]
- Upper bound: 12*V1+9+2*V1*V1+V9+V9*V1
- Complexity: n^2
* Chain [40] with precondition: [V=1,V10=0,V1>=2,V11>=0,V17>=0,V9>=V11+2]
- Upper bound: 11*V1+9+2*V1*V1+ (V1+V11)+ (V11+1)+ (V9+V11+1)*V1
- Complexity: n^2
* Chain [39] with precondition: [V=2,V1>=0,V9>=0,V10>=0,V11>=0,V17>=0]
- Upper bound: 46*V1+32+4*V1*V1+4*V1*nat(V1-V10)+9*V9+V9*V1+2*V9*nat(V1-V10)+5*V10+ (3*V1+3)+ (V9+1)*V1+nat(V1-V10+1)*3+nat(V1-V10)*21
- Complexity: n^2
* Chain [38] with precondition: [V1=1,V>=2]
- Upper bound: 13*V+12+2*V*V
- Complexity: n^2
* Chain [37] with precondition: [V=2,V1=1,V10=0,V9>=2,V11>=0,V17>=0]
- Upper bound: 11
- Complexity: constant
* Chain [36] with precondition: [V=2,V9=1,V10=0,V1>=2,V11>=0,V17>=0]
- Upper bound: 13*V1+10+2*V1*V1
- Complexity: n^2
* Chain [35] with precondition: [V=2,V10=0,V1>=2,V9>=2,V11>=0,V17>=0]
- Upper bound: 12*V1+10+2*V1*V1+ (V9+1)*V1
- Complexity: n^2
* Chain [34] with precondition: [V1=0,V>=0]
- Upper bound: 1
- Complexity: constant
* Chain [33] with precondition: [V9=0,V>=2,V1>=1,V11>=0,V10+1>=V1]
- Upper bound: 12*V+8+2*V*V+V1+V1*V
- Complexity: n^2
* Chain [32] with precondition: [V9=0,V>=2,V10>=0,V11>=0,V1>=V10+2]
- Upper bound: 11*V+8+2*V*V+ (V+V10)+ (V10+1)+ (V1+V10+1)*V
- Complexity: n^2

### Maximum cost of start(V,V1,V9,V10,V11,V17): max([max([max([10,nat(V10+1)+8,nat(V9)+12+nat(V11+1)]),11*V+7+2*V*V+max([2*V+4,nat(V10+1)+nat(V+V10)+nat(V1+V10+1)*V])]),V1+7+max([max([1,2*V*V+12*V+V1*V]),10*V1+1+max([max([2*V1*V1+max([max([nat(V9)*V1+nat(V9),nat(V9+1)*V1+1]),32*V1+22+2*V1*V1+2*V1*nat(V1-V10)+ (3*V1+3)+nat(V1-V10)*13+max([nat(V10+1)*5+2,2*V1*nat(V1-V10)+V1+nat(V9)*9+nat(V9)*V1+nat(V9)*2*nat(V1-V10)+nat(V10)*5+nat(V9+1)*V1+nat(V1-V10)*8+max([nat(V1-V10+1)*3,92*V1+26+8*V1*V1+8*V1*nat(V1-V10)+nat(V9)*23+nat(V9)*2*V1+nat(V9+V11)*2*nat(V1-V10)+nat(V10+1)*10+nat(V11+1)*12+nat(V11+2)*8+nat(V11+3)*2+nat(V1+V11+1)*3+nat(V1+V11+2)*3+nat(V9+V11+1)*V1+nat(V9+V11+1)*2*nat(V1-V10)+nat(V9+V11+2)*V1+nat(V1-V10+V11+1)*6+nat(V1-V10+V11)*2+nat(V1-V10)*43])])+ (V1+1)]),113*V+38+12*V*V+4*V*nat(V-V9)+8*V1+3*V1*V+nat(V9)*5+ (6*V+6)+nat(V1+V10)*2*nat(V-V9)+ (2*V1+2)*V+nat(V10+1)*6+nat(V10+2)*2+nat(V+V10+1)*3+nat(V1+V10+1)*V+nat(V-V9+V10+1)*3+nat(V-V9+V10)+nat(V-V9)*20])+V1,2*V1*V1+nat(V1+V11)+nat(V11+1)+nat(V9+V11+1)*V1])])])+1
Asymptotic class: n^2
* Total analysis performed in 1246 ms.

(10) BOUNDS(1, n^2)